import { ref } from 'vue'
import { defineStore } from 'pinia'
import type { WebConfigType } from '@/api/type'

export const useConfigStore = defineStore(
  'config',
  () => {
    // ! 网站配置信息
    const webConfig = ref<WebConfigType>()

    function setWebConfig(config: WebConfigType) {
      webConfig.value = config
    }
    return { webConfig, setWebConfig }
  },
  {
    persist: true,
  },
)
